<%--
  Created by IntelliJ IDEA.
  User: 28064
  Date: 2022/3/19
  Time: 11:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <title>app counter</title>
</head>
<body>
<%
    synchronized (application){
        if(application.getAttribute("counter")==null){
            application.setAttribute("counter",1);
        }
        else {
            int counter= (int) application.getAttribute("counter");
            application.setAttribute("counter",++counter);
        }
    }
%>
欢迎访问，您是第<%=application.getAttribute("counter")%>位访客！
</body>
</html>
